<template>
  <!--歌曲列表通用组件  -->
  <div class="itemList">
    <div class="item">
      <div class="itemLeft">
        <slot name="musicIndex">
          <span class="leftSpan"></span>
        </slot>
        <slot name="musicName">
          <div>
            <p>孤勇者</p>
            <span class="authorName">陈奕迅</span>
          </div>
        </slot>
      </div>
      <slot name="mv">
        <div class="itemRight">
          <van-icon class="icon bofang" name="play" size="25" color="#999" />
          <van-icon class="icon liebiao" name="wap-nav" size="25" color="#999" />
        </div>
      </slot>

    </div>
  </div>
</template>

<script>
export default {
  name: 'musicList'
}
</script>

<style lang="less" scoped>
.itemList {
  width: 100%;
  padding: 0.1rem 0.4rem;
  .item {
    width: 100%;
    height: 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    .itemLeft {
      width: 85%;
      height: 100%;
      display: flex;
      align-items: center;
      .leftSpan {
        display: inline-block;
        width: 0.2rem;
        text-align: center;
        color: #999;
      }
      div {
        p {
          width: 4.54rem;
          height: 0.4rem;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          font-weight: 700;
        }
        span {
          font-weight: 400;
          font-size: 0.24rem;
          color: #999;
        }
        .authorName {
          margin-right: 0.1rem;
        }
        margin-left: 0.3rem;
      }
    }
    .itemRight {
      width: 20%;
      height: 100%;
      display: flex;
      // justify-content: space-between;
      align-items: center;
      position: relative;
      .bofang {
        position: absolute;
        left: 0;
      }
      .liebiao {
        position: absolute;
        right: 0;
      }
    }
  }
}
</style>